package com.eddie.factory.abstractfactory.pizza;

/**
 * 将披萨类作为抽象的
 * @author Eddie
 * @date 2022/4/29 11:19
 */

public abstract class Pizza {

    protected String name;
    protected String region;

    protected Pizza(String name,String region) {
        this.name = name;
        this.region = region;
    }


    /**
     * 准备原材料，不同的披萨不一样，因此作为抽象方法
     */
    public abstract void prepare();

    /**
     * 烘烤
     */
    public void bake() {
        System.out.println(region+name+"烘烤中...");
    }

    /**
     * 切割
     */
    public void cut() {
        System.out.println(region+name+"切割中...");
    }

    /**
     * 打包
     */
    public void box() {
        System.out.println(region+name+"打包中...");
    }

    @Override
    public String toString() {
        return "订购"+region+name;
    }
}
